/*
 * @Author: hmhvictory 1400628624@qq.com
 * @Date: 2025-07-31 20:03:06
 * @LastEditors: hmhvictory 1400628624@qq.com
 * @LastEditTime: 2025-07-31 20:03:12
 * @FilePath: \Gitee实训笔记\day14\HomeWork\Test01\Person.java
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
package day14.HomeWork.Test01;

public class Person {
  private String name;

    public Person(String name) {
        this.name = name;
    }

    public void driveToCompany(Vehicle vehicle) {
        System.out.println(name + "准备开车去公司");
        vehicle.start();
        vehicle.drive();
        System.out.println(name + "到达公司");
        vehicle.stop();
    }
}
